/**$Licence:
 *  Copyright (C) 2008 - 2012 www.java1995.com . All rights reserved.
 *
 *  Use this however/wherever you like, just don't blame me if it breaks anything.
 *
 */

package com.blazemina.container;

import com.blazemina.config.BlazeminaConfig;
import com.blazemina.mina.Request;
import com.blazemina.mina.Response;
import com.blazemina.mina.handler.ServerHandler;

/**
 * * <p><strong>RequestProcessor</strong> contains the processing logic that the
 * {@link ServerHandler} performs as it receives each socket request from the
 * container. You can customize the request processing behavior by subclassing
 * this class and overriding the method(s) whose behavior you are interested
 * in changing.</p>
 * 
 * @author JackChu
 * @version 1.0.0 2012-1-11 下午10:16:24
 */
public interface RequestProcessor {
	
	/**
	 * 初始化信息
	 * @param config
	 */
	public void init(BlazeminaConfig config);
	
	/**
	 * 处理业务逻辑 
	 * @param request
	 * @param response
	 */
	public void processor(Request request,Response response);
	
	
	/**
	 * 取得配置信息
	 * @return
	 */
	public BlazeminaConfig getBlazeminaConfig();

}
